<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<html>
        <%
            String path = request.getContextPath();
            String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
        %>
    <head>
        <meta http-equiv="pragma" content="no-cache">
        <meta http-equiv="cache-control" content="no-cache">
        <meta http-equiv="expires" content="0">
        <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
        <meta http-equiv="description" content="This is my page">
        <title>新闻发布系统管理后台</title>
        <link href="../css/admin.css" rel="stylesheet" type="text/css"/>
        <link href="../css/main.css" rel="stylesheet" type="text/css"/>
        <script>
            (function () {
                var result = "${result}";
                if (result) {
                    alert(result);
                }
            })()
        </script>
    </head>
    <body>
        <div id="header">
            <div id="welcome">欢迎使用新闻管理系统！</div>
            <div id="nav">
                <div id="logo"><img src="../images/logo.jpg" alt="新闻中国"/></div>
                <div id="a_b01"><img src="../images/a_b01.gif" alt=""/></div>
            </div>
        </div>
        <div id="admin_bar">

            <div id="status">
                <c:if test="${!empty sessionScope.user}">
                    <c:if test="${sessionScope.user.urole==2}">
                        管理员：${sessionScope.user.uname} &#160;&#160;&#160;&#160;
                    </c:if>
                    <c:if test="${sessionScope.user.urole!=2}">
                        用户：${sessionScope.user.uname} &#160;
                        <span class="warning">
                          (权限不足,仅显示部分内容)
                        </span>
                        &#160;&#160;&#160;
                    </c:if>
                    <a href="<%=basePath%>users/logout">退出登录</a>&#160;&#160;&#160;&#160;
                    <a href="<%=basePath%>news">返回主页</a>
                </c:if>
                <c:if test="${empty sessionScope.user}">
                    <span class="warning">
                        未登录，<a href="<%=basePath%>news">去登陆</a>
                    </span>
                </c:if>
            </div>

            <div id="channel"></div>
        </div>
